//
//  TongZhiViewController.m
//  rrqs
//
//  Created by MyMac on 2019/5/10.
//

#import "TongZhiViewController.h"

@interface TongZhiViewController ()

@end

@implementation TongZhiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    
    
    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.view.bounds.size.height)];
    
    
    
    NSString *url = @"";
    
    if (self.type ==1) {
        self.title = @"通知中心";
        url = [NSString stringWithFormat:@"https://rider.zadtek.com/Hpage/notice?%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"EMP_ID"]];
    } else if (self.type == 2) {
        self.title = @"关于點吧骑手";
        url = [NSString stringWithFormat:@"https://rider.zadtek.com/Hpage/aboutRider?%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"EMP_ID"]];
        
    }
    
    NSURL *locationURL = [NSURL URLWithString:url];
    // 3.创建Request
    NSURLRequest *request =[NSURLRequest requestWithURL:locationURL];
    // 4.加载网页
    [webView loadRequest:request];
    // 5.最后将webView添加到界面
    [self.view addSubview:webView];
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
